<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="format-detection" content="telephone=no" />
  <meta name="format-detection" content="email=no" />
  <title>首页</title>
  <link rel="stylesheet" href="../../css/api.css">
  <link rel="stylesheet" href="../../css/main.css">
  <style>

  </style>
</head>

<body>
  <div class="app" v-cloak>
    <!-- 头 -->
    <div class="header-common">
      <div class="flex-x-s header">
        <span class="iconfont goback" @click="back">&#xe66f;</span>
        <div class="title flex-x-s" @click="openCollapse">
          {{storeInfo.shopName}}
          <!-- <span class="iconfont searchIcon">{{isShowCollapse?'&#xe665;':'&#xe666;'}}</span> -->
        </div>
        <span class="iconfont goback" @click="search">&#xe71e;</span>
      </div>
    </div>
  </div>
  <script src="../../script/api.js"></script>
  <script src="../../script/flexible.js"></script>
  <script src="../../script/fastclick.js"></script>
  <script src="../../script/vue.min.js"></script>
  <script src="../../script/iconfont.js"></script>
  <script src="../../script/common.js"></script>
  <script src="../../script/restful.js"></script>
  <script src="../../script/businessCommon.js"></script>
  <script>
    apiready = function () {
      var aMap = api.require('aMap');
      vm = new Vue({
        el: '.app',
        data: {
          isShowCollapse: true,
          storeInfo: api.pageParam.storeInfo
        },
        mounted() {
          this.openFrame()
        },
        methods: {
          back() {
            api.closeWin();
          },
          search() {
            api.openWin({
              name: 'search_win',
              url: "../search/search_win.html",
              pageParam: {
                isHistory: false,
                titlePlus: '店铺'
              }
            })
          },
          openCollapse() {
            this.isShowCollapse = !this.isShowCollapse
            api.sendEvent({
              name: 'openCollapse',
              extra: {
                key: ' value'
              }
            });
          },
          openFrame() {
            var header = $api.dom('.header-common');
            var headerH = $api.fixStatusBar(header);
            api.openFrame({
              name: 'store_home_frm',
              url: 'store_home_frm.html',
              rect: {
                marginTop: headerH,
                marginBottom: api.pageParam.footerH,
                w: 'auto'
              },
              pageParam: {
                headerH: headerH,
                footerH: api.pageParam.footerH,
                storeInfo: this.storeInfo
              }
            });
          },
          
        },
      })
    }
  </script>
</body>

</html>